import request from '@/utils/request'

export function GetALLMachine(params) {
  return request({
    url: `/QualityManage/QualityCheck/GetALLMachine`,
    method: 'get',
    // params,
  })
}

export function GetMachineDetailInfo(params) {
  return request({
    url: `/QualityManage/QualityCheck/GetMachineDetailInfo/DeviceId=${params.DeviceId}`,
    method: 'get',
    params,
  })
}

export function ChooseCheckType(params) {
  return request({
    url: `/QualityManage/QualityCheck/ChooseCheckType/DeviceId=${params.DeviceId}`,
    method: 'get',
    params,
  })
}

export function ChooseCheckTypes(params) {
  return request({
    url: `/QualityManage/QualityCheck/ChooseCheckType/DeviceId=${params.DeviceId}&CheckType=${params.CheckType}`,
    method: 'get',
    params,
  })
}

export function QualityManageList(params) {
  return request({
    url: ` /QualityManage/QualityManage/OrderList/Index=${params.Index}&Count=${params.Count}`,
    method: 'get',
    params,
  })
}

export function GetDetectFile(params) {
  return request({
    url: `/QualityManage/QualityCheck/ChooseCheckItemSubmit/GetDetectFile/DeviceId=${params.DeviceId}&ProductId=${params.ProductId}`,
    method: 'get',
    params,
  })
}

export function OrderIdChoose(params) {
  return request({
    url: `/QualityManage/QualityManage/OrderIdChoose/OrderId=${params.OrderId}`,
    method: 'get',
    params,
  })
}

export function PartDetailsInfo(params) {
  return request({
    url: `/QualityManage/QualityManage/ExportReport/PartDetailsInfo/PartId=${params.PartId}`,
    method: 'get',
    params,
  })
}

export function PartChoose(params) {
  return request({
    url: `/QualityManage/QualityManage/PartChoose/PartId=${params.PartId}`,
    method: 'get',
    params,
  })
}

export function ExportReport(params) {
  return request({
    url: `/QualityManage/QualityManage/ExportReport/OrderId=${params.OrderId}`,
    method: 'get',
    params,
  })
}

export function Analysis(params) {
  return request({
    url: `/QualityManage/Analysis/`,
    method: 'get',
    params,
  })
}

export function Detection(data) {
  return request({
    url: `/QualityManage/QualityCheck/ChooseCheckType/Detection`,
    method: 'post',
    data,
  })
}
